/**
 * @ClassName Demo12
 * @Description 练习三 模拟输出语句中的 println 方法效果
 * @Author Li
 * @Date 2022/7/31 10:08
 * @ModifyDate 2022/7/31 10:08
 * @Version 1.0
 */
public class Demo12 {
    public static void main(String[] args) {
        byte a = 1;
        short b = 2;
        int c = 3;
        long d = 4L;
        float e = 5.0F;
        double f = 6.0;
        char g = 'A';
        boolean h = true;
        String str = "Last";
        myPrint(a);
        myPrint(b);
        myPrint(c);
        myPrint(d);
        myPrint(e);
        myPrint(f);
        myPrint(g);
        myPrint(h);
        myPrint(str);
    }

    // byte
    public static void myPrint(byte a) {
        System.out.println("byte数据:" + a);
    }

    // short
    public static void myPrint(short a) {
        System.out.println("short数据:" + a);
    }

    // int
    public static void myPrint(int a) {
        System.out.println("int数据:" + a);
    }

    // long
    public static void myPrint(long a) {
        System.out.println("long数据:" + a);
    }

    // float
    public static void myPrint(float a) {
        System.out.println("float数据:" + a);
    }

    // double
    public static void myPrint(double a) {
        System.out.println("double数据:" + a);
    }

    // char
    public static void myPrint(char a) {
        System.out.println("char数据:" + a);
    }

    // boolean
    public static void myPrint(boolean a) {
        System.out.println("boolean数据:" + a);
    }

    // String
    public static void myPrint(String a) {
        System.out.println("String数据:" + a);
    }
}
